#include <iostream>
using namespace std;
namespace CWARN_DTOR_NONVIRT_DELETE {
	class A
	{
	public:

		~A() { cout << "I am A" << endl; }
		virtual void f1();
	};

	class B : public A
	{
	public:

		virtual ~B() { cout << "I am B" << endl; }
		virtual void f1();
	};

	void foo() {
		A* a = new B;
		delete a;
	}
}